<template>
    <el-button v-bind="$attrs">
        <template #icon v-if="iconName">
            <Icon :name="iconName"></Icon>
        </template>
        <slot></slot>
    </el-button>
</template>

<script setup lang="ts">
import { IconNameType } from '@/types/type'
import { ElButton } from 'element-plus'

type ElButtonProps = Partial<InstanceType<typeof ElButton>['$props']>
interface Props extends /* @vue-ignore */ ElButtonProps {
    iconName?: IconNameType
}
defineProps<Props>()
</script>

<style lang="scss" scoped></style>
